home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
util2
/
itols201.lha
/
icontools-2.01
/
memfn.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-06
|
865b
|
33 lines
/* $Id: memfn.c,v 1.1 1994/02/03 04:10:27 tf Exp $ */
#ifndef lint
static char vcid[]= "$Id: memfn.c,v 1.1 1994/02/03 04:10:27 tf Exp $";
#endif /* lint */
#define DEF_BITWISE_MEM_FUNCTION( NAME, FUNC ) \
char * \
NAME(to,from,n) \
char *to, *from; \
unsigned n; \
{ \
for(;n;n--) \
*to++ FUNC *from++; \
\
return to; \
}
DEF_BITWISE_MEM_FUNCTION(memand,&=)
DEF_BITWISE_MEM_FUNCTION(memor,|=)
DEF_BITWISE_MEM_FUNCTION(memandnot,&=~)
char *
memnot(to,n)
char *to;
unsigned n;
{
for(;n;n--)
*to++ ^= ~0L;
return to;
}